package JDBC;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;

public class Matiere_Supprimer {
	
	public  void supprimer(int id) {
		
		try {
//			System.out.println("SUPPRESSION JDBC");
			connexionBDD a = new connexionBDD();
			Connection conn = a.connect();

			Statement state = conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);	
			state.executeUpdate("DELETE FROM matiere WHERE id_matiere = "+id);
			state.close();
		} 
		catch (Exception e) {
			e.printStackTrace();
		}	

	}

}
